{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "- symptoms:\n",
      "\n",
      "    - name: 发烧\n",
      "\n",
      "<!doctype html><html><head><title>腾讯医典</title><meta data-n-head=\"1\" charset=\"utf-8\"><meta data-n-head=\"1\" name=\"viewport\" content=\"width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui,viewport-fit=cover\"><meta data-n-head=\"1\" name=\"screen-orientation\" content=\"portrait\"><meta data-n-head=\"1\" name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta data-n-head=\"1\" name=\"format-detection\" content=\"telephone=no\"><meta data-n-head=\"1\" name=\"full-screen\" content=\"yes\"><meta data-n-head=\"1\" name=\"copyright\" content=\"本页版权 baike.qq.com 腾讯医典所有。All Rights Reserved\"><meta data-n-head=\"1\" itemprop=\"name\" content=\"腾讯医典\"><meta data-n-head=\"1\" itemprop=\"description\" content=\"腾讯医典致力于向广大网友提供权威可信的医学知识，并提供易于理解的科普解读\"><meta data-n-head=\"1\" itemprop=\"image\" content=\"//th-yidian-cos-1251316161.file.myqcloud.com/yidian/production/common/image/common_logo.png\"><meta data-n-head=\"1\" http-equiv=\"x-dns-prefetch-control\" content=\"on\"><meta data-n-head=\"1\" data-hid=\"description\" name=\"description\" content=\"腾讯医典致力于向广大网友提供权威可信的医学知识，并提供易于理解的科普解读\"><meta data-n-head=\"1\" name=\"msvalidate.01\" content=\"A42AAB453C7E3C0CC4BB2BD9EF68190A\"><meta data-n-head=\"1\" name=\"360-site-verification\" content=\"fe7c0370d92c54685bf428cb0c7b8653\"><meta data-n-head=\"1\" name=\"google-site-verification\" content=\"Zb0BgHN7bqU5mOUbGjFpHAZf33CDQW6cE6dbjSPIgcc\"><meta data-n-head=\"1\" name=\"shenma-site-verification\" content=\"01d59f909e817234747653cd7114e60c_1629874456\"><meta data-n-head=\"1\" name=\"bytedance-verification-code\" content=\"EtAlcdecJnjQLHeV8qkV\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//store-30017.sz.gfp.tencent-cloud.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//th-yidian-cos-1251316161.file.myqcloud.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//statica.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//staticb.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//staticc.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//staticd.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//statice.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//staticf.baike.qq.com\"><link data-n-head=\"1\" rel=\"dns-prefetch\" href=\"//staticg.baike.qq.com\"><link data-n-head=\"1\" rel=\"shortcut icon\" href=\"//statica.baike.qq.com/yidian/production/common/image/favicon.ico\"><style data-n-head=\"1\" type=\"text/css\">.logo-loading{position:fixed;left:0;right:0;width:100%;margin:auto;top:0;bottom:0;background:#d8d8d8;z-index:130}.logo-loading .loading-area{position:absolute;width:1.3rem;height:1.3rem;left:50%;top:50%;margin-left:-.65rem;margin-top:-.65rem;background-image:url(https://th-yidian-cos-1251316161.file.myqcloud.com/yidian/production/common/image/loading-bg.png);background-repeat:no-repeat;background-position:50%;background-size:100%}.logo-loading .loading-area .loading-icon{position:absolute;width:.85rem;height:.85rem;top:.22rem;left:.22rem;background-image:url(https://th-yidian-cos-1251316161.file.myqcloud.com/yidian/production/common/image/loading-active.png);background-repeat:no-repeat;background-position:0 100%;background-size:.46rem;-webkit-animation:logoLoading .6s steps(12) infinite;animation:logoLoading .6s steps(12) infinite}.loading-alert{display:none;position:fixed;left:0;right:0;width:7.5rem;margin:auto;top:0;bottom:0;background:#d8d8d8;z-index:120}.loading-alert .alert-area{position:absolute;top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);background-color:#fff;width:5rem;-webkit-border-radius:.08rem;border-radius:.08rem;font-size:.32rem;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.2s;transition:.2s;padding-top:.32rem;text-align:center}.loading-alert .alert-area .title{color:#333;font-weight:700}.loading-alert .alert-area .content{padding:.32rem 0;color:#999}.loading-alert .alert-area .btn{position:relative}.loading-alert .alert-area .btn:before{position:absolute;display:block;top:0;left:0;right:0;content:&quot;border-bottom:1px solid #ddd;margin-left:0;margin-right:0;-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.loading-alert .alert-area .btn button{border:none;width:100%;background:0 0;line-height:.7rem;color:#26a2ff}@-webkit-keyframes logoLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes logoLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}</style><script data-n-head=\"1\">window.BAIKE_TITLE||(window.__BEFOREDOM__=Date.now(),window.BAIKE_TITLE=\"腾讯医典\",function(){try{function e(e,o){return e=e.replace(/[[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\"),e=new RegExp(\"[\\\\?&]\"+e+\"=([^&#]*)\"),o=o||window.location.href,null!==(o=e.exec(o))?decodeURIComponent(o[1].replace(/\\+/g,\" \")):\"\"}function o(e){return(e=e&&/\\/([_a-zA-Z0-9]+)\\.html/gi.exec(e))&&1<e.length?e[1]:\"\"}function t(e){var o=document.getElementsByTagName(\"HEAD\");!o||(o=o.item(0))&&\"function\"==typeof o.appendChild&&o.appendChild(e)}function n(e){var o=\".theme-color{color:\"+e.color+\"!important}.theme-fill{fill:\"+e.color+\"!important}.theme-background-color-light{background-color:\"+e.light+\"!important}.theme-background-color{background-color:\"+e.color+\"!important}.theme-border-color-light{border-color:\"+e.light+\"!important}.theme-border-color{border-color:\"+e.color+\"!important}.theme-tabs .mi-tab-nav__item_active:after{background-color:\"+e.color+\"!important}\";(e=document.createElement(\"style\")).type=\"text/css\",e.innerHTML=o,t(e)}function i(e){document.title=e;var o=document.createElement(\"iframe\");o.src=\"/favicon.ico\",o.style.display=\"none\",o.onload=function(){console.log(\"top iframe onloaded\"),setTimeout(function(){o.remove()},9)},t(o)}try{e(\"adtag\").includes(\"rmyd.\")||\"rmyd\"===o(location.href)?(n({color:\"#E83322\",light:\"#FAD5D2\"}),window.BAIKE_TITLE=\"人民医典\",i(window.BAIKE_TITLE)):e(\"adtag\").includes(\"maoyan\")?(window.BAIKE_TITLE=\"【腾讯医典×猫眼娱乐】\",i(window.BAIKE_TITLE)):e(\"adtag\").includes(\"op.co.gjwjw.kxfy\")||\"pneumonia_wh\"===o(location.href)&&\"2\"===e(\"pneutype_wh\")?(window.BAIKE_TITLE=\"科学防疫\",i(window.BAIKE_TITLE)):0===e(\"adtag\").indexOf(\"wxjk.\")||[\"lite\",\"deluxe\"].includes(e(\"minisource\"))?n({color:\"#118FFF\",light:\"#E9EDFD\"}):/^cmp/.test(o(location.href))?(window.BAIKE_TITLE=[\"nosearch\"].includes(e(\"cpconfig\"))?\"\":\"腾讯医疗内容开放平台\",i(window.BAIKE_TITLE),(r=document.createElement(\"style\")).type=\"text/css\",r.innerHTML=\".logo-loading .loading-area{background-image: url(https://th-yidian-cos-1251316161.file.myqcloud.com/kepu/production/common/image/loading.png)!important}\",t(r)):n({color:\"#02BACC\",light:\"#EBFAFB\"}),(!/quickapp/.test(navigator.userAgent)&&/txyd/i.test(navigator.userAgent)||\"1\"===e(\"pneutype_oversea\")||\"lite\"===e(\"minisource\")||\"hide\"===e(\"tmenulogo\"))&&((c=document.createElement(\"style\")).type=\"text/css\",c.innerHTML=\".tmenu-main{display:none;}\",t(c))}catch(e){n({color:\"#02BACC\",light:\"#EBFAFB\"})}}catch(e){}var c,r}(),function(e,o){var t=e.documentElement,n=\"orientationchange\"in o?\"orientationchange\":\"resize\";(e=function(){var e=t.clientWidth/750;t.style.fontSize=1<e?\"100px\":t.style.fontSize=100*e+\"px\"})(),o.addEventListener&&(o.addEventListener(n,e,!1),o.addEventListener(\"DOMContentLoaded\",e,!1))}(document,window))</script><link href=\"//staticb.baike.qq.com/yidian/production/_nuxt/app.638d5d5.css\" rel=\"stylesheet\"></head><body><div id=\"__nuxt\"><div class=\"logo-loading\"><div class=\"loading-area\"><i class=\"loading-icon\"></i></div></div><div class=\"loading-alert\"><div class=\"alert-area\"><p class=\"title\">提示</p><p class=\"content\">资源加载失败，请刷新重试</p><div class=\"btn\"><button>确定</button></div></div></div></div><script>window.__NUXT__={config:{app:{basePath:\"/\",assetsPath:\"/\",cdnURL:\"//staticb.baike.qq.com/yidian/production/_nuxt/\"}}}</script><script>!function(){try{window.__LAZYIMG__=[];for(var t=document.images,n=0;n<t.length;n++){var o=t[n],i=\"dataset\"in o?o.dataset.src:o.getAttribute(\"data-src\");i&&((r=(r=o).getBoundingClientRect()).top<1.3*window.innerHeight&&0<r.bottom&&r.left<1.3*window.innerWidth&&0<r.right)&&function(o,t){window.__LAZYIMG__.push(t);var n=new Image;n.src=t,n.onload=function(){o.src=t,o.lazy=\"loaded\"},n.onerror=function(t){var n=o.getAttribute(\"size\");o.lazy=\"error\",o.src=\"//th-yidian-cos-1251316161.file.myqcloud.com/yidian/production/common/svg/logo.svg\"+(n?\"#\"+n:\"\")}}(o,i)}}catch(t){}var r}()</script><script>window.__AFTERDOM__=Date.now()</script><script>!function(){try{function a(t){if(t=new RegExp(\"(^| )\"+t+\"(?:=([^;]*))?(;|$)\"),!(t=document.cookie.match(t))||!t[2])return\"\";t=t[2];try{return(/(%[0-9A-F]{2}){2,}/.test(t)?decodeURIComponent:unescape)(t)}catch(e){return unescape(t)}}function o(e,t,n,r){if(!t&&!r)return n;if(!/^(https*:){0,1}\\//.test(n))return n;var i=(n||window.location.href).split(\"#\");n=i[0];var a=new RegExp(\"([\\\\?&]\"+e+\"=)[^&#]*\");return n.match(a)||(n=-1===n.indexOf(\"?\")?n+\"?\"+e+\"=\"+t:n+\"&\"+e+\"=\"+t),r&&(n=n.replace(a,\"$1\"+t)),t||(n=n.replace(new RegExp(\"(\\\\?|&)\"+e+\"=[^&]*(&)?\",\"g\"),function(e,t,n){return\"?\"===t||n?t:\"\"}).replace(/\\?$/,\"\")),1<i.length&&(n+=\"#\"+i.slice(1).join(\"#\")),n}var c=!1;function d(){var e,t,n,r,i=document.querySelector(\".loading-alert\");i&&(c||(c=!0,e=window.__GLOBAL_ERROR__&&window.__GLOBAL_ERROR__.message,n=(t=function(){var e={};window.performance&&window.performance.timing&&(e.navigationL1=performance.timing),window.performance&&window.performance.getEntriesByType&&(e.navigationL2=performance.getEntriesByType(\"navigation\")[0],e.paint=performance.getEntriesByType(\"paint\"));var t=e.navigationL2||e.navigationL1,n=(e.navigationL1||{}).navigationStart;return{timing:t,paintTimings:e.paint,navigationStart:n}}()||{}).navigationStart||window.__BEFOREDOM__,r=window.__AFTERDOM__,r={reportType:\"onload\",routeType:document.documentElement.hasAttribute(\"data-n-head-ssr\")?\"ssr.enter\":\"spa.enter\",navigationStart:t.navigationStart,timing:t.timing,paintTimings:t.paintTimings,assetList:function(){if(window.performance&&window.performance.getEntriesByType)return performance.getEntriesByType(\"resource\").filter(function(e){return[\"link\",\"script\"].includes(e.initiatorType)})}(),beforeDOM:window.__BEFOREDOM__,afterDOM:window.__AFTERDOM__,error:e||\"Unknown error\",startTime:n,endTime:r,cost:r-n},n=\"performance.page\",n={time:Date.now(),current:window.location.href||\"\",referer:document.referrer||window.txydWebViewReferer||\"\",uin:a(\"bk_uin\"),token:a(\"bk_token\"),plat:\"h5\",product:\"yidian\",event:n,value:r},!/quickapp/.test(navigator.userAgent)&&/txyd/i.test(navigator.userAgent)&&(n.device_id=a(\"device_id\"),n.app_version=a(\"app_version\"),n.channel=a(\"channel\")),(r=new XMLHttpRequest).open(\"POST\",\"https://d.baike.qq.com/report/performance\",!0),r.setRequestHeader(\"content-type\",\"application/json\"),r.send(JSON.stringify(n))),i.style=\"display:block;\",i.querySelector(\".btn\").onclick=function(){window.location.href=o(\"cdnretry\",Date.now(),window.location.href,!0)})}window.loadAlert=d,window.aegisBkUin=a(\"bk_uin\")||\"\",window.addEventListener&&window.addEventListener(\"error\",function(e){if(window.__GLOBAL_ERROR__=e.error||window.__GLOBAL_ERROR__,e&&e.target&&e.srcElement){var t,n,i,r,a=e.target||e.srcElement||{},o=a.src||a.href,e=a.tagName;if(\"string\"==typeof o&&e)switch(window.__GLOBAL_ERROR__=new Error(\"AssetLoadError \"+o),e.toLowerCase()){case\"script\":n=a,/aegis|zepto|VueRouter|manifest|app/.test(i=o)&&(1<(r=parseInt(n.getAttribute(\"data-retry\"))||0)?d():((n=document.createElement(\"script\")).setAttribute(\"data-retry\",r+1),n.src=i.replace(/\\/\\/static(\\d+).baike.qq.com\\//,function(e,t){return\"//static\"+((parseInt(t)||1)+1)+\".baike.qq.com/\"}),n.onload=function(){if(/zepto|VueRouter/.test(i))for(var e=document.scripts||[],t=0;t<e.length;t++){var n=e[t];if(/manifest/.test(n.src)){var r=document.createElement(\"script\");r.src=n.src,document.body&&document.body.appendChild(r);break}}},document.body&&document.body.appendChild(n)));break;case\"link\":t=a,r=o,1<(n=parseInt(t.getAttribute(\"data-retry\"))||0)||((t=document.createElement(\"link\")).setAttribute(\"rel\",\"stylesheet\"),t.setAttribute(\"type\",\"text/css\"),t.setAttribute(\"data-retry\",n+1),t.href=r.replace(/\\/\\/static(\\d+).baike.qq.com\\//,function(e,t){return\"//static\"+((parseInt(t)||1)+1)+\".baike.qq.com/\"}),document.head&&document.head.appendChild(t));break;default:return}}},!0);var e=(i=(i=\"adtag\").replace(/[[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\"),i=new RegExp(\"[\\\\?&]\"+i+\"=([^&#]*)\"),s=s||window.location.href,null!==(s=i.exec(s))?decodeURIComponent(s[1].replace(/\\+/g,\" \")):\"\");if(e)for(var t=document.links,n=0;n<t.length;n++){var r=t[n];r.href=o(\"adtag\",e,r.href,!0)}}catch(e){}var i,s}()</script><script crossorigin=\"anonymous\" src=\"//statica.baike.qq.com/yidian/production/common/js/aegis.1.34.15.min.js\"></script><script>try{var env=\"production\",filterUrl=\"production\"===env?[\"d.baike.qq.com\"]:[\"/reportd\"],aegisId=/h5\\.baike\\.qq\\.com/.test(window.location.host)?2325:2337;window.medicalAegis=window.Aegis&&new Aegis({id:aegisId,reportApiSpeed:!0,reportAssetSpeed:!0,api:{retCodeHandler:function(e){var t=!1;try{t=!(0===(e=JSON.parse(e)).body.bizcode&&0===e.body.retcode||0===e.body.bizcode&&1004===e.body.retcode||0===e.body.bizcode&&1014===e.body.retcode)}catch(e){}return{isErr:t,code:e.body.retcode||e.body.bizcode}}},beforeReport:function(e){var t=!0,o=[\"getWebkitEvent\",\"mttLongPressVar\",\"vivoNewsDetailPage\",\"x5onSkinSwitch\",\"find variable: Fw\",\"changeThemeType\",\"updateBookMallStatus\",\"getShareData\",\"webPageManager\",\"MTTATTRIBUTE_Done\",\"The quota has been exceeded\",\"QuotaExceededError: DOM Exception 22\",\"请求异常\",\"sogouMobileExplorer\",\"vivo_checkMediaPausedReason\",\"processRandomSelector \",\"execWebFn\",\"handleMessageFromTcs\",\"sogousearchios\",\"SeMobFillFormTool\",\"finishWithOtherInfo\",\"qb_bridge.fireEvent\",\"_mz_getNextLink\",\"getInjestStatus\",\"PLAY_SONG_FAIL\",\"drawCallShare \",\"_nativeGetNewsAllImages\",\"on_pop_state_original\",\"Script error\",\"MyAppGetLinkTitle\",\"DouguoJSBridge\",\"nodeName\",\"UCShellJava.sdkEventFire\",\"getBoundingClientRect\",\"webviewresume\",\"clearSearchWord\",\"shareInfo\",\"getIosSeMobWebTranslateStatus\",\"Unexpected identifier\",\"nav_call_update_item_status\",\"SyntaxError: Unexpected token '<'\",\"SHBridge\",\"SogouMse.videoPauseTool.pauseVideo\",\"ZhihuiOS\",\"smartHome\",\"getFeedExposedInfo\",\"VAD_ON_APPBACK\",\"ClickLink.observePage\",\"GM_getValue\",\"window.bannerNight\",\"highlightRender\",\"_vds_hybrid\",\"runCustomize is not defined\",\"MyAppGetHTMLElementsAtPoint\",\"do_execute_rule\",\"unsafeWindow is not defined\",\"QK_middlewareReadModePageDetect\",\"c35 is not defined\",\"Error.message: Cannot read property 'vdata\",\"ec_wise_ad ec_wise_asyn ec_wise_ad_card\",\"instantSearchSDKJSBridgeClearHighlight\",\"Uncaught TypeError: Cannot read property 'setTheme' of undefined\"],r=[\"triggerEvent\",\"playState\",\"contentWindow\",\"volume\",\"htmlFilter\",\"setflashfocus\",\"click\",\"transmiDeviceConnectState\",\"transmitRefreshPullData\",\"transmitWatchInfoChange\",\"dispatch\",\"Uncaught SecurityError: Blocked a frame with origin\",\"onNightModeChanged\"],n=[\"ajaxerror\",\"retcode\",\"orientation\",\"接口返回异常\",\"无需继续发送请求\",\"dhdgffkkebhmkfjojejmpbldmpobfkfo\",\"iikmkjmpaadaobahmlepeloendndfphd\",\"The play() request was interrupted\",\"The request is not allowed by the user\",\"The operation was aborted\",\"The operation is not supported\",\"Failed to load because no supported source\"],i=[\"/mobile/skintest/result.html\"],a=navigator.userAgent,d=e.msg||\"\";if(\"2048\"===e.level&&(e.level=\"64\"),(4==e.level||2048==e.level)&&d){for(var s=0;s<o.length;s++)if(-1<d.indexOf(o[s])){t=!1;break}for(s=0;s<r.length;s++)if(-1<d.indexOf(r[s])&&-1<a.indexOf(\"Android\")){t=!1;break}return\"development\"!==env&&-1===d.indexOf(\"qq.com\")&&-1===d.indexOf(\"th-yidian-cos-1251316161.file.myqcloud.com\")&&(t=!1),(-1<d.indexOf(\"Uncaught SyntaxError: Unexpected end of input\")||-1<d.indexOf(\"Uncaught SyntaxError: Invalid or unexpected token\")||-1<d.indexOf(\"Uncaught TypeError: Cannot redefine property: platform\"))&&(-1<a.indexOf(\"SogouMobileBrowser\")&&-1<a.indexOf(\"Android\")||-1<d.indexOf(\"adtag=sg.\")||-1<a.indexOf(\"VivoBrowser\"))&&(t=!1),-1<d.indexOf(\"Uncaught SyntaxError: Unexpected token u in JSON at position 0\")&&-1<a.indexOf(\"OppoBrowser\")&&(t=!1),!(-1<d.indexOf(\"n.findIndex is not a function\")&&-1<a.indexOf(\"HeyTapBrowser\"))&&t}if(8==e.level&&d){for(s=0;s<n.length;s++)if(-1<d.indexOf(n[s])){t=!1;break}}else if(1==e.level&&d)new RegExp(filterUrl[0]).test(d)&&new RegExp(\"res time\").test(d)&&(t=!1);else if(\"64\"===e.level&&d)for(s=0;s<i.length;s++)if(-1<d.indexOf(i[s])){t=!1;break}return t},logCreated:function(e){var t=!0;return(!new RegExp(filterUrl[0]).test(e.msg)||!new RegExp(\"res time\").test(e.msg))&&t},beforeReportSpeed:function(e){for(var t=!0,o=0;o<filterUrl.length;o++)if(-1<e.url.indexOf(filterUrl[o])){t=!1;break}return t},uin:window.aegisBkUin||\"\",offlineLog:!0,offlineLogExp:7})}catch(e){}</script><script src=\"//statica.baike.qq.com/yidian/production/common/js/Vue2.6.11-VueRouter3.2.0-Vuex3.4.0-VueLazyload1.3.3.min.js\"></script><script src=\"//statica.baike.qq.com/yidian/production/common/js/zepto.notap.js\"></script><script src=\"//staticb.baike.qq.com/yidian/production/_nuxt/manifest.73d0eb3.js\"></script><script src=\"//staticb.baike.qq.com/yidian/production/_nuxt/vendors~app.0414839.js\"></script><script src=\"//staticb.baike.qq.com/yidian/production/_nuxt/app.05b34b5.js\"></script></body></html>\n",
      "发烧\n",
      "\n"
     ]
    }
   ],
   "source": [
    "\n",
    "import requests\n",
    "import bs4\n",
    "import urllib\n",
    "import sys\n",
    "import importlib\n",
    "import string\n",
    "importlib.reload(sys)\n",
    "                            \n",
    "\n",
    "\n",
    "\n",
    "with open(\"format.1649835003733.txt\", 'r',encoding='utf-8') as file_to_read:\n",
    "#   while True:\n",
    "    lines = file_to_read.readlines()\n",
    "#     print(lines)\n",
    "for line in lines:\n",
    "    print(line)\n",
    "    linetmp=line\n",
    "    if \"- name:\" in linetmp:\n",
    "        url='https://h5.baike.qq.com/mobile/search.html?search='+linetmp[12:-1]+'&VNK=8621f000&adtag=ow'\n",
    "        url =urllib.parse.quote(url,safe=string.printable)\n",
    "        response = urllib.request.urlopen(url, timeout=20)\n",
    "        result = response.read().decode('utf-8','ignore').replace(u'\\xa9', u'')\n",
    "        print(result)\n",
    "#         result = json.loads(result)\n",
    "\n",
    "#         r = requests.get(url,headers=headers)\n",
    "#         content = bs4.BeautifulSoup(r.content.decode(\"utf-8\"), \"lxml\")\n",
    "#         print(content)\n",
    "        print(linetmp[12:])\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print('tet')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "navis",
   "language": "python",
   "name": "navis"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
